-- GENERATED SPELL FOR [Theras] --


function spell0_21168(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(39262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21168', 1000, 1)
end

function spell1_21168(pUnit, Event) --@Metamorphosis,Self--
pUnit:FullCastSpellOnTarget(36298,pUnit)
pUnit:RegisterEvent('Sorts_21168', 626, 1)
end

function spell2_21168(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21168', 618, 1)
end

function Sorts_21168(pUnit, Event)
local choix_sorts_21168 = math.random(0, 2)
if choix_sorts_21168 == 0 then
pUnit:RegisterEvent('spell0_21168', 1, 1)
end
if choix_sorts_21168 == 1 then
pUnit:RegisterEvent('spell1_21168', 1, 1)
end
if choix_sorts_21168 == 2 then
pUnit:RegisterEvent('spell2_21168', 1, 1)
end
end

function mob21168_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21168', math.random(1500, 3000), 1)
end

function mob21168_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21168_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21168_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21168, 1, 'mob21168_Action')
RegisterUnitEvent(21168, 2, 'mob21168_Leave')
RegisterUnitEvent(21168, 3, 'mob21168_Kill')
RegisterUnitEvent(21168, 4, 'mob21168_Die')
